# 使用map的方法生成

import multiprocessing

def cube_number(n):

    return n * n * n

if __name__ == "__main__":

    numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

    with multiprocessing.Pool(processes=4) as pool:

        results = pool.map(cube_number, numbers)

    print("Input:", numbers)
    print("Output:", results)

